package com.lin.operatorlogrecord.controller;

import com.lin.operatorlogrecord.entity.enums.LogTypeEnum;
import com.lin.operatorlogrecord.entity.vo.OperatorLogVO;
import com.lin.operatorlogrecord.service.IOperatorLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: chenghao.lin
 * @Date: 2023/09/21
 * @Description:
 */
@RestController
@RequestMapping("/operator/log")
@RequiredArgsConstructor
public class OperatorLogController {

    private final IOperatorLogService iOperatorLogService;

    @GetMapping
    public List<OperatorLogVO> list(@RequestParam LogTypeEnum logTypeEnum) {
        return iOperatorLogService.list(logTypeEnum);
    }
}
